#ifndef __WHITEPLAYER_H__
#define __WHITEPLAYER_H__

#include "../checkerBoard/CheckerBoard.hpp"
#include "../chess/WhiteChess.hpp"
#include "Player.hpp"
#include <string>

/**
 * @brief 白色棋子玩家
 *
 */
class WhitePlayer : public Player {
public:
  WhitePlayer(std::string &name) : Player(name) {}
  virtual ~WhitePlayer() {}
  bool playGames(unsigned int x, unsigned int y) override {
    Chess *chess = new WhiteChess(x, y);
    if (chess == nullptr) {
      return false;
    }
    CheckerBoard *checkerBoard = CheckerBoard::getCheckerBoard();
    if (checkerBoard->checkerBoardIsValidPosition(chess) == false) {
      return false;
    }
    checkerBoard->setChessset(chess);
    checkerBoard = nullptr;
    return true;
  }
};

#endif // __WHITEPLAYER_H__